Post

Replies

Boosts

Views

Activity

Reply to Differentiate between Homescreen click and Lock Screen click
Much later - my use case is around a managing a hotspot connection which I use to to control a device. (using NEHotspotConfigurationManager) When the user launches the app, then I connect to the known hotspot. Obviously that puts up an alert for them to accept. When the app is minimised (user is switching to another app) - then I want to remove the hotspot configuration so that I return the device to the prior state. When the device is simply locked, I don't want to remove the configuration because then I'll have to put up another prompt to reconnect as soon as the user unlocks. any suggestions? illustration: App Launches -> Prompt user to connect to hotspot Device Locks -> Nothing (it will be normal for them to spend an hour or so in this state) Device Unlocks -> Nothing App Minimised -> Remove hotspot config, return device to initial state Currently, I have App Launches -> Prompt user to connect to hotspot Device Locks -> Remove hotspot config, return device to initial state Device Unlocks -> Have to prompt the user again to connect App Minimised -> Remove hotspot config, return device to initial state
Jun ’22
Reply to Snapshot of a SwiftUI View
I battled this for a while. I have a specific view that I needed to capture which was sometimes larger than the screen.My workaround in the end was to put the view I wanted to capture in a UIHostingController which I then put in the main view of a UIScrollView (this gives me flexibility on size)then func image(with view: UIView) -> UIImage? { UIGraphicsBeginImageContextWithOptions(view.bounds.size, view.isOpaque, 0.0) defer { UIGraphicsEndImageContext() } if let context = UIGraphicsGetCurrentContext() { view.layer.render(in: context) if let image = UIGraphicsGetImageFromCurrentImageContext() { return image } return nil } return nil }
Apr ’20
Reply to Sandbox users don't work for in-apps testing (issue started on Jan-6, 2017)
ok - For me, I'm testing on Mac. After much pain, this is finally what worked1) create clean account2) verify email3) sign in (provide security questions)4) delete build folder5) rebuild app6) launch with finder7) log in8) password is wrong (It isn't) - click to reset9) choose the security question reset option (reset by email doesn't work)10) reset things (your dob is 1980)11) Finally things work - and for the first time you see the [Environment: Sandbox) labelI chose to cancel the transaction at this pointyou can now run the app from xcode, and as soon as you do a purchase-related thing, you're already signed in and see the [Environment: Sandbox]It's quite possible some of those steps were not required!
Mar ’20